package com.nunbey.lingxi.lincat.retrofitutil;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class RetrofitUtil {

    private static final String baseUrl = "http://1.116.41.133:8099/";
    public static Retrofit retrofit;


    public static synchronized Object getApiInstance(Class apiType){
        if(retrofit == null){
            retrofit = new Retrofit.Builder().baseUrl(baseUrl)
                    .addConverterFactory(GsonConverterFactory.create())
                    .build();
        }
       return retrofit.create(apiType);
    }


}
